package com.atguigu.userprofile.common.dao

import com.atguigu.userprofile.common.bean.{TagInfo, TaskInfo}
import com.atguigu.userprofile.common.util.MysqlUtil

object TaskInfoDAO {


  def getTaskInfoById(taskId:String): TaskInfo ={

    val sql=s"""
               |select  *
               | from task_info where id=${taskId}
               |""".stripMargin
    val maybeTaskInfo: Option[TaskInfo] = MysqlUtil.queryOne(sql, classOf[TaskInfo], true)
    if(maybeTaskInfo==None){
      null
    }else{
      maybeTaskInfo.get
    }
  }

}
